package com.nhh.v.mapper;

import com.nhh.v.dto.NhhwakUserHashRateInfo;
import com.nhh.v.model.NhhwakUsers;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface NhhwakUsersMapper extends Mapper<NhhwakUsers> {


    BigDecimal selectNhhCoinsById(Integer id);

    NhhwakUsers selectUserById(Integer id);

    NhhwakUsers selectInviteById(Integer id);

    NhhwakUsers selectHashRateInfo(Integer id);

    Long selectCountByStatus(Integer status);

    Long updateHashRateById(@Param("id") Integer id, @Param("hashRate") Long hashRate);

    void updateNickname(@Param("id") String uId, @Param("nickname") String nickname);

    String selectNickname(String uId);

    void updateUserCoins(@Param("id") Integer id, @Param("coinNums") BigDecimal coinNums);

    Integer getInviteUserNumById(Integer id);

    List<NhhwakUserHashRateInfo> getActiveUserHashRate(Date startTime);
}